package com.park.server.dao;

import java.io.Serializable;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;


public interface BaseMapper<T, PK extends Serializable, E> {
    List<T> selectByQuery(@Param("query") E query, @Param("rowBounds") RowBounds rowBounds);


    // =====================
    int countByExample(E example);


    int deleteByExample(E example);


    int deleteByPrimaryKey(PK id);


    int insert(T record);


    int insertQuery(E record);


    int insertSelective(T record);


    List<T> selectByExample(E example);


    T selectByPrimaryKey(PK id);


    T selectByPrimaryKey(E example);


    int updateByExampleSelective(@Param("record") T record, @Param("example") E example);


    int updateByExample(@Param("record") T record, @Param("example") E example);


    int updateByPrimaryKeySelective(T record);


    int updateByPrimaryKey(T record);


    Integer selectMaxId();
}